﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using BusinessRule;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using ProjectManApi.Extensions;

namespace ProjectManApi.Controllers
{
    [ApiController]
    [Route("[controller]")]

    public class CSController : MvcControllerBase
    {
        [HttpGet]
        public IActionResult Index()
        {
            return Content("11111111111111111");
        }

        //[Authorize(GetUserName = "Permission")]
        [HttpGet("IndexCS")]
        public async Task<IActionResult> IndexCS()
        {

            //111111
            CsRule csRule = new CsRule();

            string strret = await csRule.GetCS();

            return Success(JsonConvert.DeserializeObject(strret));
        }
    }
}